package com.zhanbo.zhanbowymusic.main.mine.collections;

import android.os.Bundle;

import androidx.recyclerview.widget.LinearLayoutManager;

import com.mwx.baselib.base.BaseFragment;
import com.zhanbo.zhanbowymusic.R;
import com.zhanbo.zhanbowymusic.databinding.FragmentCollectionsPodcastsBinding;
import com.zhanbo.zhanbowymusic.main.mine.collections.adapter.PodcastsCollectionsListAdapter;

import java.util.ArrayList;
import java.util.List;

public class PodcastsCollectionsFragment extends BaseFragment<FragmentCollectionsPodcastsBinding> {

    public static PodcastsCollectionsFragment newInstance() {

        Bundle args = new Bundle();

        PodcastsCollectionsFragment fragment = new PodcastsCollectionsFragment();
        fragment.setArguments(args);
        return fragment;
    }

    @Override
    protected Object getLayout() {
        return R.layout.fragment_collections_podcasts;
    }

    @Override
    protected void init(Bundle savedInstanceState) {
        initData();
        initView();
        initListener();
    }

    @Override
    protected void initData() {

    }

    @Override
    protected void initView() {
        List<Integer> stringList = new ArrayList<>();
        stringList.add(1);
        stringList.add(1);
        stringList.add(1);
        stringList.add(1);
        stringList.add(1);
        stringList.add(1);
        stringList.add(1);
        stringList.add(1);
        stringList.add(1);
        stringList.add(1);
        stringList.add(1);
        stringList.add(1);
        stringList.add(1);
        binding.rvCollectionsPodcasts.setLayoutManager(new LinearLayoutManager(_mActivity, LinearLayoutManager.VERTICAL, false));
        PodcastsCollectionsListAdapter adapter = new PodcastsCollectionsListAdapter(_mActivity);
        adapter.getItems().addAll(stringList);
        binding.rvCollectionsPodcasts.setAdapter(adapter);
    }

    @Override
    protected void initListener() {

    }
}
